package com.xuecheng.api.filesystem;

import com.xuecheng.framework.domain.filesystem.response.UploadFileResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * 文件系统Api
 */
@Api(value = "文件系统Api",tags = {"提供文件接口,提供文件上传下载,查询接口"})
public interface FileSystemControllerApi {
    /**
     * 文件上传接口
     * @param multipartFile 文件
     * @param businesskey 业务key
     * @param filetag 文件标签
     * @param metadata 元信息,Json字符,服务器会转换成Map对象
     * @return 上传后响应
     */
    @ApiOperation("上传文件接口")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "multipartFile",value = "文件",required = true, dataType = "file"),
            @ApiImplicitParam(name = "businesskey",value = "业务key",required = true),
            @ApiImplicitParam(name = "filetag",value = "文件标签",required = true),
            @ApiImplicitParam(name = "metadata",value = "元信息,Json字符,服务器会转换成Map对象" ,dataType ="map" )
    })
    UploadFileResult upload(MultipartFile multipartFile, String businesskey, String filetag, String metadata);
}
